home *** CD-ROM | disk | FTP | other *** search
/ SIGGRAPH 2002 Course Notes / SIGGRAPH 2002 - Course Notes - Disc 1.iso / pc / notes / 07 / Authoring / worlds / 3dShapes.wrl next >
Encoding:
Text File  |  2002-04-08  |  1.8 KB  |  103 lines

  1. #VRML V2.0 utf8
  2.  
  3.  
  4.  
  5. EXTERNPROTO Toss [
  6.   field MFNode objectShape
  7.   exposedField SFTime cycleInterval
  8.   exposedField SFTime startTime
  9.   exposedField SFTime stopTime
  10.   exposedField SFBool enabled
  11.   exposedField SFBool loop
  12.   exposedField MFFloat key
  13.   exposedField MFVec3f keyValue
  14. ] "Toss.wrl"
  15.  
  16.  
  17.  
  18.  
  19. # Insert the moving shapes
  20.  
  21. Transform {
  22.   translation 3.5 0 0
  23.   children [
  24.     Toss {
  25.       objectShape [
  26.         Transform {
  27.           translation -1 0 0
  28.           rotation .71 0 .71 .5
  29.           children [
  30.             Shape {
  31.               appearance Appearance {
  32.                 material Material {
  33.                   diffuseColor 1 0 0
  34.                 }
  35.               }
  36.               geometry Box {
  37.                 size .7 .7 .7
  38.               }
  39.             }
  40.           ]
  41.         }
  42.       ]
  43.       cycleInterval 3
  44.       enabled TRUE
  45.       loop TRUE
  46.       startTime 1
  47.     }
  48.  
  49.  
  50.     Toss {
  51.       objectShape [
  52.         Transform {
  53.           translation .2 .2 0
  54.           children [
  55.             Shape {
  56.               appearance Appearance {
  57.                 material Material {
  58.                   diffuseColor 0 .8 0
  59.                 }
  60.               }
  61.               geometry Sphere {
  62.                 radius .4
  63.               }
  64.             }
  65.           ]
  66.         }
  67.       ]
  68.       cycleInterval 5
  69.       enabled TRUE
  70.       loop TRUE
  71.       startTime 1
  72.     }
  73.  
  74.     Toss {
  75.       objectShape [
  76.         Transform {
  77.           translation 1 0 0
  78.           rotation .71 0 .71 -.40
  79.           children [
  80.             Shape {
  81.               appearance Appearance {
  82.                 material Material {
  83.                   diffuseColor 0 0 1
  84.                 }
  85.               }
  86.               geometry Cone {
  87.                 bottomRadius .4
  88.                 height .7
  89.               }
  90.             }
  91.           ]
  92.         }
  93.       ]
  94.       cycleInterval 4
  95.       enabled TRUE
  96.       loop TRUE
  97.       startTime 1
  98.     }
  99.   ]
  100. }
  101.  
  102.  
  103.